imx: Add GPIO_TO_PORT macro in the mxc_gpio driver
authorVikram Narayanan <[email protected]>
Tue, 10 Apr 2012 04:26:08 +0000 (04:26 +0000)
committerAlbert ARIBAUD <[email protected]>
Mon, 16 Apr 2012 12:53:59 +0000 (14:53 +0200)
Add GPIO_TO_PORT macro in the mxc_gpio.c driver

Signed-off-by: Vikram Narayanan <[email protected]>
Acked-by: Stefano Babic <[email protected]>
drivers/gpio/mxc_gpio.c

index df6bbbbc4befbaa15501aebb4eb7384e5ebb70ce..7e65b39a7581df0928fb9168e6bf09c13cb93b93 100644 (file)
@@ -34,6 +34,7 @@ enum mxc_gpio_direction {
        MXC_GPIO_DIRECTION_OUT,
 };
 
+#define GPIO_TO_PORT(n)                (n / 32)
 
 /* GPIO port description */
 static unsigned long gpio_ports[] = {